using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class AnswerContentMap : EntityTypeConfiguration<AnswerContent>
    {
        public AnswerContentMap()
        {
            // Primary Key
            this.HasKey(t => t.AC_ID);

            // Properties
            this.Property(t => t.AC_Number)
                .HasMaxLength(50);

            this.Property(t => t.AC_Option)
                .HasMaxLength(50);

            this.Property(t => t.AC_Content)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("AnswerContent");
            this.Property(t => t.AC_ID).HasColumnName("AC_ID");
            this.Property(t => t.AC_Number).HasColumnName("AC_Number");
            this.Property(t => t.AC_Option).HasColumnName("AC_Option");
            this.Property(t => t.AC_Content).HasColumnName("AC_Content");
        }
    }
}
